#pragma once
#include <iostream>

//pthread_mutex_t task_gmutex = PTHREAD_MUTEX_INITIALIZER;

class Task
{
public:
    Task(int x = 0, int y = 0)
        : _x(x), _y(y)
    {
    }
    void Execute()
    {
        _resulte = _x + _y;
    }
    void Debug()
    {
        //pthread_mutex_lock(&task_gmutex);
        std::cout << _x << " + " << _y << " = ?" << std::endl;
        //pthread_mutex_unlock(&task_gmutex);

    }
    int Result()
    {
        //pthread_mutex_lock(&task_gmutex);
        std::cout << _x << " + " << _y << " = " << _resulte << std::endl;
        //pthread_mutex_unlock(&task_gmutex);
        return _resulte;
    }
    ~Task()
    {
    }

private:
    int _x;
    int _y;
    int _resulte;
};
